package com.mage.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class IndexController {

    @Value("${slogan}") // 读取配置文件中的值
    private String slogan;

    @RequestMapping("")
    public String index(Model model) {
        model.addAttribute("slogan", slogan);
        return "index";
    }

}
